Improved XML documentation. Removed unused code. Removed 11 warnings