Add initial persistence layer and related tests.