serve not-found page with 404 code
moved js code from templates into separate files