edited comments, and some code