Get rid of globals
Get rid of generator object
Rename regexp