Fixed dtd problem, it used to be testable only when connected to the
internet because of the dtd internet URL. Some fixes to the code, but
Unit testing is still not working.