More work on tabstemplate