Re-wrote findMTuples. Using explicit loops improved performance. Still to investigate parallelisation and write unit tests.