Refactor view contents into application layout.