GUI class tidied up and more readable (hopefully)