More fixes to the mime parser, very close to having a working parser now...