Replaced usage of deprecated Pair with the built-in tuple syntax