sophia: proper compaction cycle over deleted data; cursor fixes