Added Ajax calls to close and delete tasks