Code duplication was removed. XML comments were corrected. Inappropriately named variables have been renamed.