BM: Started working on the template loading from keyvalue.