Allow frontends to submit multiple events at once.
Fix some warnings.