Refactored to allow bulk export

Added Newtonsoft.Json for the serialization of the objects.
Allowed the batch size to be set in the application.