Small cleanup of demo code and initialization functionality in modeC()