Improve parsing of options.