fixing template rest call & some template edit/add page fixes