Renamed a method and replaced two magic numbers.