Added ability to add closures as listeners