Introduce a shallow hierarchy of simple generator classes, collecting common functionality and allowing for future snap-in generator replacement. Use John Resig's "class"-based inheritance per http://ejohn.org/blog/simple-javascript-inheritance/.