Add some comments and clean some things up.