Hooked up the UI events