Library import and export

Fixes #2