Functionality moved to background.js