Drafted the template generator