cleaned up some code, removed some NSLog's
Fixed bug with batch write from file