Also rework the so the platform absorbs all the business logic that was going in the wrong place.
Add logging and saving templates to the database for historical accuracy.