Added better conversion of keys/instances to URLs