Initial write up of popup.js