Added functionality to 'quit' button