Replaces an extension of an adapter class with a direct implementation of the listeners.