Rafactor storage of templates. More better.