Added support for callback to load imports

Fixes #19