Refactored SCM export logic