Clean up doc generator to work with new AST.