Merge pull request #10 from marcoraddatz/master

3.0 -> 3.1
refactored the template logic