Added tests for class WordEntry; fixed a couple of bugs.