More work removing functions from templates, API changes