refactor code as per Android coding style guide. Need to continue for the entire file