Added DisconnectedEvent.
Added internal id tracking for API use.
Small fixes.