Mime edit minor tweaks

The only real bug fix is the first commit, the others are just stylistic changes.