Removed redundant variables under doneButtonPressed