database data save refactored
Merge remote-tracking branch 'origin/master'