added the ability to specify whether to delete old templates and create templates without messages