Cleaning up the popup.js