Remove temporary file and clean up imports