Refactoring and changed layout of main screen