added ToHeader and FromHeader and the base stuff needed for those.