refactoring application layout