Deleted while loops for buttons