Replaced magic numbers with defines.