Fix template update, clone and instantiate
Merge pull request #9 from rajthilakmca/master

Fix template update, clone and instantiate