upgraded AST internals to cleanly render as JSON