Changed templates to Mako
Changed dict to tuples
Changed code style.
Changed iteration way through list of tuples.
Merge pull request #6 from add00/bug_2699

[2699] Changed templates to Mako