Adjusted for feedback, ordered options for config, removed duplicate options, fixed session initialization code