WIP (Compiling) Multithreading somewhat working

Added multithreaded states.