minor changes, formatting, comments, refactoring, clean up