Clean reference files, prepare for merge