Refactoring of the option parser