Some coding-style fixes, like not using tabs
Silence a couple of valgrind warnings