Code style: for -> foreach where eligible.
Code style: fix unecissary imports
Code style: access member through static ref
Suppress warning for pointless arithmetic expression (as it could evaluate to false depending on project configuration).