Changes to use ListenerAdapter, compilable