Made the secret_id func more reusable. Added a test that is none.