cleaning up urls and solving 404 errors