Add support for modifying locations.

These seems to work with my manual tests. I wasn't able to get the unit tests running, so I didn't try to add any new ones.