Cleaned up grammar.py