factory cleanup