clean up factory