Connection events

Connection and Controller now fire 'connect' and 'disconnect' events so that the developer is able to better handle this stuff.

I'm very new to the code base, so please tell me if anything is where it doesn't belong ;)