Added Nihal's changes to record.py
Nihal's multithreading and Domain splitting code implemented in record.py in latest MainCode version.
To test, pull MultiMaincode and run program normally. Accept the merge request once you are all satisfied with the modifications.