Finished goto refactoring: no more gotos.