Brushing up.

More appropriate formatting, added comments, etc.