Added writing locations to db.
Merge remote-tracking branch 'origin/master'
Added location saving