Whitespace cleanup
Style cleanup

Prefer inline assignment in if statement over preemptive return statement
Add parens for clarity