Added quit functionality