Issue 31 — Part 1

Quite some changes, but I think this releases #52 #39 (at least when I'm done with this one here on #31) and #75 for others to work on.
Bunch of tests to be added for #52 #39 and #75 as well... 
This looks fishy to me - you're attempting to write the new value to SOR again, then removing the key from the store on the following line - doesn't this introduce inconsistency?