Refactor Logic to use comparator provided by dbManager and switch to displayedTasksList instead of a Map