Fix compilation problem and clarify semantics
Fix leak of collection name components
Fix leak in test suite