Debugged functions for parsing command-options.