Moved secret key setting.