#14, better template parsing