Changed if uniquify statements to ternary operators