Add update tests

Added tests to exercise the update functionality and found and fixed a bug in the in-memory storage code