add InstaceTemplate and some test
more test
Merge pull request #6 from lazytiger/master

add InstaceTemplate and test