Simplify

* Remove goto's (at the cost of introducing multiple return points)
* Inline break conditions into loop conditions
* Remove unnecessary temporary variables