rework the parsing code so that it fails on unrecognised headers until
they are supported, and used the new container class