Moved the batchsize specification from the scanner constructor to the next function