Added Quit function