Made persist_metadata do all the work at the end; need to percolate size changes now