Feature/mimetype to class

Closes #139