Switched to generators for async.
Made a working memory-based markov chain implementation and started moving it to the database.