Rename single-letter variable
Add parens for readability
Simplify nested conditional