Changed scope of handleEvent method to the listener object