Better support for HTML content

Added support for preferring html content over text content and for storing html content in addition to text content.