major refactor of grammars and validations