further documentation and clean up