Fix onhashchange event.
Clean up regex.
Add index.