Implemented routing with the history API