[WIP] REST comments sync

**DO NOT MERGE**

This hasn't been tested yet, and is not finished, but I created the pull request to get some feedback on how the code is being refactored.