Finished implementing helper functions for new AST