Made the bulk inserter be more flexible and support data service as input.
Fix broken unit tests.