Slight optimization in ResourceFactory. Still would like to find a way to cache the generators without creating classloader leaks until next call is executed.