Added TaskEquals function
Fixed equals method for task.