Incorporate typ[eahead

Works, needs style fixes
Final test version