more documentation and clean up