Refactored documentation engine, fixed agent metadata updater.