Made some new changes and the output of the HTML is now correct