WIP on readwrite tests and fixes