Got rid of the rest of the valgrind errors.