Some lint fixes and a fix for files without mimetype.