Refactor router and make it so links can be bookmarked