Got rid of some magic numbers