Use the right class for each file type.
Ignore case in file extensions.