In a design review with @netniV, we discussed moving this to as class and to improve the tokenization to make the code a bit more readable.