Added functionality to Task.pm and the corresponding tests in t/task.t