Fixes after valgrind leak checks
Add sqlite impl for bench interface