move mimetype to core module