Removed bad for loop; exit logic with exit button