Removed some nasty goto's and labels here and there