This line and the next could be condensed down to:
```
look_ahead = @frames[@nxt, 2]
```
Which would also allow the ```look_ahead = []``` on line 50 to be removed.