Got rid of a bunch of "magic numbers"