Add imports API.

Fixes issue #123