Added basic gui and event handling.