Some docgen fixes.
Fix 'doc' command.
More docgen fixes.