Some little improvments of template