Consolidate value replacement functionality