Updated for current rust
Implemented LookaheadBuffer properly using character iteration