Convert the library to use new event methods