Working on the update statements.

Finally... but the insert still needs to be fixed and tested.