Simplify parseCommandArguments method