Mod: Moved helpers code into Routine.
Mod: Moved helpers code into Routine.