Updated control script to clean up better