Port to ___FOREIGN_DEP scheme; remove array and pointer stuff.