Add CollectionInfo struct, some refactoring