Added secure controller and other security logic