make connection an EventEmitter
cleanup lint errors, rename to snake case