Added extra functionality to View which makes it easier to work with templates.