Started to split the program into two threads.