Remove unnecessary semi-colons.

Noticed by lint.
Simplify some if()s.

As noticed by Android Studio's Code Analysis.