Abstrating away from the async API