Changed object factory and clean up inventory