functions for getting Tasks in different phases
refactoring functions to one liners
Repeating code moved to formatTasks function
unnecessary def's refactored