refining templates and views