Only use the first instance of Content-Type. This should help with inline-messages.
- Roll folded Content-Types into a single line.
- Move break to the proper location, so that we exit out after finding a single content type.
Better handling of content-type (patch by John Sutherland)
applied standard naming conventions and indentation rules