Refactor python templates so that the util library is no longer within
the templates directory and add query/custom template for python.
Refactor perl template parsing and add query/custom template for perl.
Refactor ruby template parser and add query/custom template for ruby.