Split TemplateRegistry file into 2 class files

Change-Id: I39c67751c0b9e1638f27a81bdfbbf14c50d10300