public void commit() {
        normalize();

        if (diff.get().size() == 0 && deleted.get().size() == 0) {
            return;
        }

        for (Map.Entry<String, String> node : diff.get().entrySet()) {
            old.put(node.getKey(), node.getValue());
        }

        for (String key : deleted.get()) {
            old.remove(key);
        }


        diff.get().clear();
        deleted.get().clear();

        save();
    }