Some refactoring on how to call the tasks