Added classes and hooks for the background tasks