remove redundant hunit dep
some cleanup, better tests, better media type parsing