fix quite a bit of duplication in the headers; also add the STS header for added win