Added rule for all grammars, Fixed things as best as I could