started on getting EditBags to update the database

created some framework for the code, comments explain what goes in the
if statements and such.