Clean up AST