all methods except the most generic ones should be private
removed duplication of field iteration in KeyGroup specialization of
serialize by simply streaming fields of KeyGroup in streamFields as
well.