Update library to portable and async refactoring