plugging some memory leaks
removed the valgrind outputs