Replacing hardcoded magic numbers with library constants