def structure_torrent_data(target_dict, hash_str, data):
    """Updated target dict with torrent data structured suitably
    for config storage.

    :param target_dict: dict - dictionary to update
    :param hash_str: str - torrent identifying hash
    :param data: dict - torrent data received from RPC (see parse_torrent())
    :return:
    """
    data = dict(data)
    if 'hash' not in data:
        data['hash'] = hash_str
    if 'name' not in data:
        data['name'] = None
    if 'url' not in data:
        data['url'] = None
    target_dict[hash_str] = {'hash': data['hash'], 'name': data['name'],
        'url': data['url']}
