Moved tests but did not implement them. That will happen in a seperate p...

...ull request. Some of the structure is implemented in the memory store because I started in the "wrong" end.
Can you revert all stylistic changes in this file and take them in a separate PR if needed? They will cause conflicts with other changes.