Use pushState for routes and some minor fixes.