Fix deadlock in importer
Refactor mame name handling
Update reference paths