DRY of the html_parts and text_parts methods

Hi, just a quick DRY update.