Cleaned up thread creation