Made main thread handler static.