Some code cleanup, mostly in commenting