Added on_set command in factory.rb that can save a context to be used in the future so a new instance will not be made when that definition is called again.