Refactoring

Refactored code according to code style guidelines for contributors
(http://source.android.com/source/code-style.html)