Do a little cleanup and add some comments.