Got rid of some breaks and continues

Control flow is a bit clearer now, I guess.  Also I've noted a few
things that should be changed or just weren't clear without comments.