Grammar refactor and build fix.