Refactor some data munging so it can be used by export
Refactor some data munging so it can be used by export

Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode