Split out HTML content-type detection to separate module
Add tests for content-types
Add sensible implementation of text/html content-type detection