Various fixes for mediateam, margining correction, addition of headers, et
al