cosmetic changes + remove unused sectionEntryCount
Moved match implementation details out of records