Refactor async fetch algorithm