Commenting and Coding Style Polished. More Thorough Array-Bounds and Return Value Checking.