Moves the code for a few task-related operations into functions

Prepares for project-view of tasks
Turns task organization (into arrays based on deadlines or urgent/secondary status)
and creation of HTML based off of those arrays into separate functions.