Storing different objects in same variable
===

I'm trying to figure out how i could store different objects in a certain "namespace".

I have something like this:

**app.js**

    // This is the startup script:
    var MyApp = {}
    MyApp.ui = {}
    MyApp.ui = require('ui/MainWindow');
    MyApp.ui = require('ui/SecondWindow');
    MyApp.ui.MainWindow.init();

Then i also have `MainWindow.js` and `SecondWindow.js`, which looks like this:


    var MainWindow = {
    	test: "Main"
    }
    
    exports.MainWindow = MainWindow;

----

    var SecondWindow = {
    	test: "Second"
    }
    
    exports.SecondWindow = SecondWindow;

The `exports.XXXWindow = XXXWindow` basically makes that object available.

So in my `app.js` i try to store the `MainWindow` object in `MyApp.ui`. So i can call it like this:

`MyApp.ui.MainWindow.test`

Then i'd also like to add the `SecondWindow` object to that. So i can call that in the same way:

`MyApp.ui.SecondWindow.test`

But the way i have it now causes the second require to overwrite the first one. So it now only points to `SecondWindow`. What do i have to do so that i can call both objects from `MyApp.ui` ??