Code cleanup

Moved HTML decoding to MS's code, and improved the
GetFileNameSansExtension method