Fixed my broken nested while loop and edited the HTML file