Crappy template compiler