Just a note about using the continue statement to forego the remainder of a loop - be SURE you're not issuing the continue statement from within a SWITCH case - doing so will not continue the while loop, but rather the switch statement itself.
While that may seem obvious to some, it took a little bit of testing for me, so hopefully this helps someone else.