clean up popup.js, adjust layout