initial code for remote control - cExpect and for switchApps (still working on this -- not tried compiling, have to finish a bit before trying it out)