Major refactoring: Centralize reading command line parameters