Controlling task queue execution.

Changed the way background task queues are executed to be done manually. A function that run all tasks was created.