Clean and consolidate export code #190

Cleaning
Clean and consolidate export code #190

Cleaning