Remove trailing spaces
Match routes against location.hash instead of location.path
Handle query string in location.hash