Fix a bug with expectedDeliveryDate in SettingsFragment. Refactor codebase.