Remove duplication in CLI#{add, remove}