Cleaning up generator code by isolating most of it to one function.  Adding `create`, semi-shim for `Object.create`.