Reworked how on-demand values are generated