Refactored buffers from scanner into automaton
Refactored Scanner to take stream as input, use yield returns in tokenization