Add some more tests
Improve helpful template expanding method