updated some templates and view functions