added navigation controller and some UI events.