changed string functions to be single-ended (0 terminates)
refactored to single-ended strings, added word def test