clean up factories