Refactoring the "set" command.