Trigger prescale corrected, TurnOn macros modified, templates macro automatized