Remove superfluous ternary operators