Add settings saving to user defaults
Implemented database storage