Added command line switches for the various functions
Use the logger rather than fmt for log:ish messages