Get rid of some magic numbers