A little cleanup and some documentation.