Fix embarrassing mistake with application specific variables.

- Two variables (isRunning, scheduledToRun) which should have been tied
  to an application where not. Synchronisation problems (and various
  others) ensued.
Fix text of debug Message.