Replace template key backslashes with slashes

Also refactor for clarity and line length
Fix #29
Merge pull request #30 from brunch/fix/29

Replace template key backslashes with slashes