simple refactor of sync adapters to reduce code duplication.