buncha fixes, moved logic to async