Removed diagrams folder from index
Put the same statments in a seperate function
Some code improvements in PortMessageBox class