Fixed isEnd() in StringInStream, fixed tests, minor style fixes