Remove ternary expressions

A more readable and scalable approach