TODO: Fix Scheduler, fix task generation in client.