Fixes for the current master

It compiles now in the current master. I am not sure if it is correct to use the DefaultScheduler instead of the PlatformThread.

There were no tests but the demos are working.