Commit 16

Fixing issues with inserts into db. Inserts were reflected as updates in
the db.