Improvements to AST builder.