Refactored out some magic numbers