Major restructuring of how tasks works.

There are now two types of tasks: Task and GraphicTask.