Useless var & ternary use