Improve the couting of ID's sections.
Fix ID lookups.
Tweak comments
Add two new testcases