documentation and clean up.