Some more changes for robustness
Fix MediaType ToString and allow blank parameter values, and other fixes