Issue #149: cleanup function to prepare for additional records