Improved listOfPairs partition fuction and executor for threads. UNIT TESTED but STILL need test with Conv ann.