cleanup and refactoring of the core mbui gui elements