Add some comments and reindent a few lines.