tidying up factories