private void SerializeSettings(ref SValue state)
    {
        SValue hash = state.SetNewHash("settings");

        foreach (KeyValuePair <string, SValue> pair in settingsData)
        {
            if (pair.Key == Scheme)
            {
                continue;
            }
            hash[pair.Key] = pair.Value;
        }
        string scheme = settingsData.ContainsKey(Scheme) ? settingsData[Scheme].String : null;

        state[Scheme] = !string.IsNullOrEmpty(scheme) ? SValue.NewString(scheme) : SValue.None;
    }