Fixed problems with cancelling out of a file dialog, minor formatting stuff