Added the ability to register listeners