Use a private record for the callback state