Changed the way that the html is created, now only its content gets replaced