Describe the issue with concurrency, the global state and what went into the recent changes in #196, #197 and #198.