Init the main thread