Factoring out modifications for simpler testing