Replace id with uid whenever possible.

The term 'id' is probably best used internally, and uid externally.

Therefore, id can be used for persistance locally. 'uid' will now be
the global identifier that is publicly broadcast.