Moves CardListener to its own class.