A little cleanup and documentation