Refactoring AST instantiation.
Optimization.