tidy up the diagram div