Removes Bogus Code and Initialises the Event Editor Dialog.