def simplify_rating(d):
    """
    Removes some keys from a flattened rating dict
    """
    keys_to_delete = []
    for key in d.keys():
        if key.endswith(".type") or key.endswith(".max_score"):
            keys_to_delete.append(key)
    
    for key in keys_to_delete:
        del d[key]
    
    return d