Replace hard-coded values with static variables

If I get any time, I'll make another couple of refactor branches for you.