Completely revamp database layer and test cases as DoctrineORMServiceProvider.