Allow media_types and canonical_media_type to be called as class methods.
Set default world and name attributes if not specified by constructor call.