Corrections to get pairing process working again and updated unit tests