Added back support for handlers as an object.