Tidy up the rotate text and html