re-structure default.js popup