General code clean up

This PR doesn't change anything from a runtime perspective. It just makes the code cleaner and in accordance with Android code guidelines.