Automatic documentation generation + bugfix