Separate the listener from the main class, for better costum handling.