Mode source files added. ControlledMode added but not fully tested.