Added inputing new word and ending program procedure in UI