changed Make file to compile with -g and also got rid of some valgrind errors