Minor code improvements, testability improvements, XML documentation update, code regions