Remove dead code and move import code into import.js.