Bugfix with BlockingTaskManager as well as other minor refactorings.