Improvements to Task and IdSet