Split core and high-level AST methods in two classes.