Added updated todo list using array sorting functions