Renamed addHandler to setHandler to reflect functionality