Add a 404 error page

Add a custom 404 error page.
Refactoring: some minor adjustments.