Simplify AST