Adding support for generators, refactored configuration to be a part of Context.