Add DB logic for inserts + updates
Added better db syncing -- but probablyl will use manual upload most of the time