Extract resource loading to xblock utils