Refactored so that the implicit root is explicit in the AST.