Mostly fixes the AST