Ported async logic (WARNING: mustache broken)