Major refactoring of Tasks