Remove buggy threading code