tidy up factories