Applies code cleanup and removal of unused bits from AST parser.