Fixes multiple static code issues found by Android Studio.