Introduce history iterator
Make Corpus use Word directly
Introduce BeamDecoder