Move import code into import.js.
Remove unreferenced code.