Refactoring module-popup.js
Update examples.