almost done with primary.xml. Reading reworked to avoid excessive list copying