Added missing dbi interface methods
Fixed tests
Implemented dbHasCompleted and some code formatting
Added tests for dbHasCompleted implementation