refine the templates dir