Some more refactoring of Wikimedia: better checks for taxonomy, filtering mime types