migrate to imports.js and tests for complex dependencies