Add custom Pair implementation to avoid the usage of a third party library.