Refactored HomeActivity.java.