Add new version of async_storage
Fix bugs and re-order code