Changed Environment to Factory, since this class has been renamed.