docs: def on_ok(self):
          """ Delete the instances that the user chose to delete """
          npyscreen.notify_wait('Deleting instances given...',
                                title='In progress')
          # keep track of number for shifting instances down for alignment
          shift_num = 1
          to_update = []
          for i, val in enumerate(self.del_instances.values):
              # clean all tools for renmaing and relabeling purposes
              t = val.split(':')
              section = self.display_to_section[val]
              prev_running = self.manifest.option(section, 'running')
              run = prev_running[0] and prev_running[1] == 'yes'
              if i in self.del_instances.value:
                  if run:
                      # grab dependencies of tools that linked to previous one
                      if i == 0:
                          dependent_tools = [self.manifest.option(
                              section, 'link_name')[1]]
                          for dependency in Dependencies(dependent_tools):
                              self.clean(**dependency)
                              to_update.append(dependency)
                      self.clean(name=t[0], branch=t[1], version=t[2])
                  self.manifest.del_section(section)
              else:
                  try:
                      # update instances for tools remaining
                      section = self.display_to_section[val]
                      settings_dict = json.loads(self.manifest.option
                                                 (section, 'settings')[1])
                      settings_dict['instances'] = self.new_instances
                      self.manifest.set_option(section, 'settings',
                                               json.dumps(settings_dict))
                      # check if tool name doesn't need to be shifted because
                      # it's already correct
                      identifier = str(shift_num) if shift_num != 1 else ''
                      new_section = section.rsplit(':', 2)
                      new_section[0] = re.sub(r'\d+$', identifier,
                                              new_section[0])
                      new_section = ':'.join(new_section)
                      if section != new_section:
                          # clean tool so that we can rename its container and
                          # labels with new information
                          self.clean(name=t[0], branch=t[1], version=t[2])
                          prev_name = self.manifest.option(section, 'name')[1]
                          new_name = re.split(r'[0-9]', prev_name)[0] + \
                              identifier
                          self.manifest.set_option(section, 'name', new_name)
                          # copy new contents into shifted version
                          self.manifest.add_section(new_section)
                          for val_pair in self.manifest.section(section)[1]:
                              self.manifest.set_option(new_section, val_pair[0],
                                                       val_pair[1])
                          self.manifest.del_section(section)
                          if run:
                              to_update.append({'name': new_name,
                                                'branch': t[1],
                                                'version': t[2]})
                      shift_num += 1
                  except Exception as e:
                      npyscreen.notify_confirm('Trouble deleting tools'
                                               ' because ' + str(e))
          self.manifest.write_config()
          tool_d = {}
          for tool in to_update:
              tool_d.update(self.prep_start(**tool)[1])
          if tool_d:
              self.start_tools(tool_d)
          npyscreen.notify_confirm('Done deleting instances.',
                                   title='Finished')
          self.change_screens()