clean up and command line script