Clearing unnecessary html. Viva the loops