Fixed up crazy comments, and reindented the whole lot.