The templates can be calculated now. I have to write the calls for all the other data.
Latest code has been written

I have finished the template calculations