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

@singingwolfboy Please review.