Began unit testing and refactoring of the batch inserter.