More work on template ui