Refactoring content script, getting popup to communicate with content script.