valgrind 1st pass + coding style