Improved parsing of command line parameters.