Working with thml templates