Replace format with resource type (but keep format class for later use).