Remove that pesky while loop

Simple recursion is enough to loop through the lines