begin cleanups for csv memory db refactorization