reformating the code and removing several errors
makeing some helpful changes
added table printer for html
organized imports