Adding UI and events.