major changes related to app mode selection and database selection