Right now a lot of the HTML output code is just print statements with hard coded HTML elements. The code should probably be changed to use the native XML output code from the ElementTree module. References: https://docs.python.org/3/library/xml.etree.elementtree.html#modifying-an-xml-file