moved parse header stuff to the mime-class and some rewriting to follow