An initial implementation of hashUrl and urlFromHash.