Rearrangement

Instead of a recursive function, I put the repeating statements in a while true loop.
This makes for better error handling: if the syntax is invalid, use the <code>continue</code> command.