Remove cruft and insert export-ignore declarations