Added app exit handling.
Started working on button click event.