Cleaned up concurrent code.