Avoid repeated initialization.

Could happen in handler of OS X open document.
Clean up templates.