Shout-out to Oliver G who helped rid the exponential slowdown from the grammar.