added hash-based routing for browsers not supporting history.pushState