Could we change this code following same structure as  https://github.com/borjasalguero/gaia/blob/fxa_proposal_complete/apps/system/fxa/js/fxam_overlay.js ?