Merge pull request #5 from mvala/master

Added template support