Fixed popup bug with openbadges.  Moved code from ProfileUI.js to openbadges.js