Refactored Data Creation + Fixed Multithreading issue