Refactoring tasks classes