Giving ability to turn secure mode on and off
Removed testing code
Merge branch 'master' into marionette_gjf