I guess my main issue is the repetition of the replacement string. I guess that could be fixed by putting it in a variable before the conditional.