some cleanup and documentation