Clean and consolidate export code #190

Clean docs etc