This is a really big copy and paste... It would probably be better to refactor this into one common method that could use either getNext or getNextBulk (should that be called just getBulk?) and have two public wrapper functions...