Improve api for statusbar