DRY - Don't Repeat Yourself - Move Delay out of IF.