Refactoring add command and show command.