Secret key, and deprecation warnings fixed