Pair is currently storing elements twice, reduce memory footprint