Various cleanups to all templates and controls.