added support for the event streams.
Also some fixes in ApiConnection