Beautify dom structures and styles