Added unit tests and completed refactoring to use XmlDocument classes for generating HTML.