Uses better "quit" function.