Add phase handling to Item_factory