Allow template file to be separated

Template problem solved. I think...