Add templating for BCE