Added a background worker to handle tasks.