Revised database structure, added db.insert command