WIP, moving from ui.js to bb