Update popup.js

cleaning up code, prepping for getHtmlContent()