Big refactoring of the SourceCollector