refactoring of the tasks tracker