template improvements
Merge pull request #4 from ray176/templateImprovements

template improvements