Kblang template

Fixes #279
not tested. @dswd please review this.