Added controllerFactory property. Fixed some notices.