Implemented deleteTask() method.