refactor grammar automations
refactor grammar automation implements