Refactored ternary operators