Fix Script

Script now uses the `Grammar` class.
Simplify Grammar Looping Condition