Tidying of commandline option parsing code