Currently the background script in the extension includes lot of functionality in a single file and the script is becoming unmaintainable. Idea is to modularize the code and break it into smaller parts so that it is easier to maintain and scale in future.