Use switch for parsing arguments.