removed unecessary libraries. renamed handler to listener