added documentation generation system and bugfixes