Simplify the AST.