Extract command line option parsing logic to OptionParser
Refactor OptionParser