Refactored magic constant duplication and removed unnecessary method.