Spin on the object factory pattern