Split Main into Single Threaded and Multi-Threaded