Minor refactoring on TasksActivity