Sync local <-> remote vals

TODO

  • Separate the logic in two steps:
    1. Detect changes
    2. Apply changes