Documentation and some cleanup.