Refactoring on MainActivity