Fixed bug with header write back. Need to reduce the number of triples needed