clean up and documentation