Recursion instead of goto

@igorw makes a really informative and detailed analysis to explain why he chose goto calls instead of recursion