first steps on refactoring the sqlite backend out, so that we can use other backends to