is there a way to simplfy this code? 
// Define the variables for the formulas inside a Shared View Model
class SharedViewModel(private val context: Context) : ViewModel() {
    var maxDontNeed by mutableStateOf(500.0)
    var maxNice by mutableStateOf(100.0)
    var maxEssential by mutableStateOf(10.0)
    var freeTime by mutableStateOf(120.0)
    var disposable by mutableStateOf(20000.0)
    var costCalibration by mutableStateOf(833.0)

    //Generate Flow for each variable for reading


    val maxNiceFlow: Flow<Double> = context.dataStore.data
        .map { preferences ->
            // No type safety.
            preferences[keymaxnice] ?: 100.0 // default value
        }

    val maxDontNeedFlow: Flow<Double> = context.dataStore.data
        .map { preferences ->
            // No type safety.
            preferences[keymaxdontneed] ?: 500.0 // default value
        }

    val maxEssentialFlow: Flow<Double> = context.dataStore.data
        .map { preferences ->
            // No type safety.
            preferences[keymaxessential] ?: 10.0 // default value
        }

    val freeTimeFlow: Flow<Double> = context.dataStore.data
        .map { preferences ->
            // No type safety.
            preferences[keyfreetime] ?: 120.0 // default value
        }
    val disposableFlow: Flow<Double> = context.dataStore.data
        .map { preferences ->
            // No type safety.
            preferences[keydisposable] ?: 20000.0 // default value
        }
    val costCalibrationFlow: Flow<Double> = context.dataStore.data
        .map { preferences ->
            // No type safety.
            preferences[keycostcalibration] ?: 833.0 // default value
        }


    // Suspend functions for writing values


    suspend fun updateMaxNice(value: Double) {
        context.dataStore.edit { settings ->
            settings[keymaxnice] = value
        }
    }

    suspend fun updateMaxEssential(value: Double) {
        context.dataStore.edit { settings ->
            settings[keymaxessential] = value
        }
    }

    suspend fun updateMaxDontNeed(value: Double) {
        context.dataStore.edit { settings ->
            settings[keymaxdontneed] = value
        }
    }

    suspend fun updateFreeTime(value: Double) {
        context.dataStore.edit { settings ->
            settings[keyfreetime] = value
        }
    }
    suspend fun updateDisposable(value: Double) {
        context.dataStore.edit { settings ->
            settings[keydisposable] = value
        }
    }
    suspend fun updateCostCalibration(value: 