move flat volume logic into the core. while doing so add n_volume_steps field to...