minor changes to comments and error code 'Unused' -> 'ReplicaNotAvailable'