Added functionality for quit button