Small refactor of mime-guessing PR