Loopified unnecessarily recursive code.