Finish off remote data stuff

This PR finishes off the basic remote data stuff.
Lots of code reorganization, callbacks, etc.
There's probably little bugs left, but at this point I can do stuff without the app crashing.