added database table for settings
fixed a settings query
Merge remote-tracking branch 'origin/master'