Implement export feature.
Modify testcase for simple usage.