Improve template file