Added some security type framework. Still needs work.