I took this very nice code for parsing commandline options from Chrisian Holms
option-- library (http://cholm.home.cern.ch/cholm/misc/).
