Added the 404 page code generation and other amendments