Added x64 support, multithreading and implemented errors