Use a private record for event listener state