First attempt at multithreading and fixing message system