fix white space, comments, debugging, general formatting