Rephrase some strings, move some magic numbers to constants.