removed junk event handler
tidied up demo code