fix a bunch of warnings and errors. Among other things, this

ensures that the broken links are working.