Got rid of unecessary dom elements