Minor cleanup
valgrind optional
cleanup
stats fixes