Clearing up valgrind memory leak outputs