cleanup and documentation.