quick-hack to allow getNextWord to exit at some point in spaceless inputstrings (since end-of-word is defined as ' '); tests succeed. Added waaaay too many comment-notes about these issues.