complete refactoring of taskmanager->worker communication, better isolat...

...ion, removed shared vars