~90 LOC just to avoid a goto?

I think that speaks for itself :)