Updating template to support views