Use concat instead of push + flatten
Listen to storage event to stop/start background tasks