Proposal to convert your Javascript code to Object-Orientated code

The way you're writing your code looks like you're trying to write Object-Orientated programs, though you're not doing it correctly. I took the liberty of writing an example of how you should write your code. Look at the controller.init function for the example.