Better testable DB class