Move resource loading to separate call