Fixed a SubStr() bug. Added documentation in source code.