Background tasks now differentiate failures and interruptions, also general cleanup and refactoring of the background tasks