Revert "beginig of background.js refactoring [wip]"

This reverts commit dcc9a923acd157a9aa8655031d28b5129586b73e.