tidied stuff such as preference dialog and outputting of text to panel - issue #2