add rendering of 404 page on appropriate errors

also made foundation working in production