JavaScript miniApps: Refactoring Toolbar