more generic clean-up of resource attributes