Hooking up background task delegate and cleanups