most valgrind errors and warnings resolved still to do the stuff in the LEAKS file
more leakes removed with valgrind