Interm commit to fix issue with export logs.
Minor cleanup.
Merge remote-tracking branch 'origin/export_fix' into next