Add DB Layer
Add DB layer tests
Fix some integration tests
Merge branch 'create-db-layer'