Added some checking to see if URI pages exist, when they're used in the templates. I have no idea why I didn't think of it before, but this was causing errors if people type their own addresses into the search bars, so now they get a slightly nicer error page.