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.
The downside of not using BaseLib here is that the documentation would contain all the inherited methods from HTMLElement. So as a follow-up we might want to restructure it again internally. Maybe we can discuss this tomorrow.