added refresh function to template. Template now has both .template and .node properties to better work with parent Element object