Use requirejs for import.js

    And fixes for rebase-breakage.