Fix invalid HTML, and invalid Python