Tidy up the layout of the TemplatesDialog a bit.