Move templates from layout to separate view.