Refactor out some magic numbers