Replaced some magic numbers