Work on refactoring the grammar.