Use the mime package. Closes #148
No longer import from tools
Improve content-type handling with bodies.
Closes #140