clean up style
issue 21, implement saniTize where applicable
issue 22, fixed valgrind fails to run bug