Factory refactory