Refactored Grammars

Refactored the grammars, by getting rid of some of the hang overs of
previous itereations, cleaning up the code required to run, and
explicitly making required variables go into the constructor.