Implemented record pruning