DB test fixes and InMem improvements.
Implemented DB size getter.