public static void removeFeatures(FeatureContainer fc, FreeColObject fco) {
        FeatureContainer c = fco.getFeatureContainer();
        if (fc != null && c != null) {
            for (Entry<String, Set<Ability>> entry : c.abilities.entrySet()) {
                Set<Ability> abilitySet = fc.abilities.get(entry.getKey());
                if (abilitySet != null) {
                    abilitySet.removeAll(entry.getValue());
                }
            }
            for (Entry<String, Set<Modifier>> entry : c.modifiers.entrySet()) {
                Set<Modifier> modifierSet = fc.modifiers.get(entry.getKey());
                if (modifierSet != null) {
                    modifierSet.removeAll(entry.getValue());
                }
            }
        }
    }