Let the program exits when there is no more tasks.

The unused function `makeTasks` is removed.