Added singlethreaded support.