minor changes to comments, some code beautification, and the like