Added export feature

Fixes issue #3