Simplify async database code and a few other bugs, bump version.