Added a shared context layer to the models and controllers.