task dependencies, a little bit of refactoring
Merge pull request #477 from niphlod/enhancement/scheduler_deps

new feature (task dependencies) and a little bit of refactoring