uimanager now working with eventmanager and looper, added tests, lot of refactoring and tweaking: