Refactoring, use an array to build command line options