- added valgrind-based test (the first one ever ;)) - fixed memory leak in imdiag (guess how this was detected...)