cleanup data structures at the end of repair (so between processing docs)