an attempt towards nesting templates. added __str__ and a call to str() in compileTemplate. feel free to scrap it