Beginning architecture change for adaptability to a variable number of modes, not limited to 3.
Also trying to remove certain robustness issues. Keeping older versions for 2 and 3 modes for easy access during code refactoring before deletion.
Authored by: ssix 2013-09-25
Parent: [r25951]
Child: [r25953]