Optimized task manager.