do the input history thing I was talking about
Add quasi-helpful compaction script...

Since it determines that things got lost, maybe something is wrong elsewhere?