Updated the page laoder to support templates, json requests, returns 404 if page isn't find and even loads an error page when an issue is found