Address bugs 2228 and 2231. Begin XML documentation.