bug fixes, documentation and test coverage