changed saveall method to use batch
added test case for collection.save and made some fixes in baseobject regarding connection