Added untested ability to load pairs from a file.