Setting up the background worker