Refactor modules and tests for Browser window UI

This PR is part of the issue #18 for using ui modules.

@ahal and @chmanchester can you please have a look at this? Lets me know if something looks strange to you.
Keep in mind that the tabbar only exists for the browser window! We have way more window types to cover beside the browser, where this would fail.