Adds statusCode helper & more frontend updates

The frontend/routes matching is much more reliable now. Logic is definitely getting a bit complex, need to add tests, but they're pretty functional. Going to have to watch Primer again now.