Bug fixes and a test for word Definition endpoint

- Added a test for the word enpoint and fixed the resulting bugs that I
  found. (oops, was in too much of a hurry earlier)