Improve resource tracking utilities