Better namespace support on generators.
Fix some namespacing bugs.
DRY up some code.
Fix variable.