misc code cleaning based on Android Studio analysis