Simplified the GUI event system used in simpletest.