manage listeners as keys on a javascript object, not an array