Converted the set of listeners into a first-class object