Adding the batch() convenience function and restructuring the event format for sendAll()