Reworked multithreading approach