Adds check for non-html media types and removes old debugging info