Reworked multithreading and ticking