added logic to attach controllers to views. Views are queued for when the controllers are ready