Updated code so no longer need special template code to bring up plugin in SmartEdit mode