Added eventID attribute and new constructor.
Implemented exception handling.
Code convertions.
Made setConnected private.