Update ShareTemplate.py to use data structure insead of a mess of ifs and elses