Added multithreading to application