Proper cleanup.
Better resource management for Task.