Grammar refactoring.