allow for modes with/without stdev
general tidying, add command line options and usage message