Rework resource callbacks a bit