Switeches to EventEmitter, cleans up JSHint