Sync grammar and Aggregatefactory refactoring.