Make template generator more generic
0.3.6