Added secret generation.
Added separate app setting and key setting.