Centralizing event handler in background with continues connections with content script