Added quit functionality.