Refactor function processExports.