added autodocumentation functionality
fixup unit-tests