More tests for BaseUI. Some refactoring to fix bugs.
baseui test
Tweaks