cleaned up using statements and separated SyncStateRepository into its own file