Move toc scraper to link.py; fix a few regex typos