Added the background service to support offline mode