Refactors application layout