Cleaned up get_primary_resource implementations