SOme refactoring for nas sync