Fixed 404 handling and added a placeholder template for a pretty 404 page.