added read-write of states
removed PhraseTable from PhrasePair