Refactorings.
Rebuilt metagrammar parser.