Not relying on totalCount in copyAllEntries() + cleanups