Eliminate some magic numbers