Various changes to script

Don, I've made several changes to the script including the output format.