Agent: documentation generator fixes
TSCommon: documentation and bugfixes