Refactor and improve mba_widgets