Major changes (valgrind checks)