refactored application layout