refactoring main layout, responsiveness, bugs