More work on template chooser.