Implemented multithreading architecture.