small cleanups to script.