Refactored MainActivity
Minor refactoring ok