Added a bool flag so we no when to exit the parser loop
moved returns outside of the while loop
Please note I have not really tested this outside of the building the app and seeing a flag nor have a benchmarked I am putting up this PR so you can see my approach
I attempted to make this more readable:
Please note I have not really tested this outside of the building the app and seeing a flag nor have a benchmarked I am putting up this PR so you can see my approach