minor changes in commenting, naming conventions