Refactoring: changed magic numbers to constants