fixed up links and made most tests pass