Renamed controller#view_manager to active_view
Reordered the window resize code. Seems buggy.
Simplified the ready function in the controller